{template '_header'}
 
<div class="page-heading"> <h2>扫描记录 <small>人数: <span class='text-danger'>{$total}</span></small></h2> </div>
	
  <form action="./index.php" method="get" class="form-horizontal table-search"  role="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="ewei_shopv2" />
                <input type="hidden" name="do" value="plugin" />
                <input type="hidden" name="p"  value="poster" />
                <input type="hidden" name="method" value="scan" />
                <input type="hidden" name="id" value="{$_GPC['id']}" />
<div class="page-toolbar row m-b-sm m-t-sm">
                            <div class="col-sm-5">
				 
			 <div class="btn-group btn-group-sm" style='float:left'>
				<button class="btn btn-default btn-sm"  type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>

			</div> 
			<div class='input-group input-group-sm'   >
				   {php echo tpl_daterange('time', array('placeholder'=>'扫描时间'),true);}
			</div>	
                               </div>	
	  
			 
                            <div class="col-sm-6 pull-right">
			 		 
				<select name='searchfield'  class='form-control  input-sm select-md'   style="width:100px;"  >

				<option value='rec' {if $_GPC['searchfield']=='rec'}selected{/if}>推荐人</option>
				<option value='sub' {if $_GPC['searchfield']=='sub'}selected{/if}>扫码人</option>
				 

			</select>
				<div class="input-group">				 
                                        <input type="text" class="input-sm form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="昵称/姓名/手机号"> <span class="input-group-btn">
						
                                     <button class="btn btn-sm btn-primary" type="submit"> 搜索</button> </span>
                                </div>
								
                            </div>
</div>
  </form>
 

            <form action="" method="post" >
  
   {if count($list)>0}
   
            <table class="table table-responsive">
                <thead>
                    <tr>
                        <th>推荐人</th>
                        <th>扫码人</th>
                        <th>扫码时间</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $row}
                    <tr>
                        <td><img src='{$row['avatar']}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {$row['nickname']}
                        ({$row['realname']}/{$row['mobile']})
                        </td>
                        <td><img src='{$row['avatar1']}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {$row['nickname1']}
                        ({$row['realname1']}/{$row['mobile1']})</td>
                        <td>{php echo date('Y-m-d H:i',$row['scantime'])}</td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
  {$pager}
       {else}
     <div class='panel panel-default'>
	<div class='panel-body' style='text-align: center;padding:30px;'>
		 暂时没有任何扫描记录!
	</div>
</div>
     
     {/if}
         </form>
 
{template '_footer'}
